package com.zijie.hosptal.service.impl;

import com.zijie.hosptal.common.Result;
import com.zijie.hosptal.mapper.*;
import com.zijie.hosptal.service.ChartsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.Collections;
import java.util.List;

@Service
public class ChartsServiceImpl implements ChartsService{

    private PatientMapper patientMapper;
    private DoctorMapper doctorMapper;
    private DoctorSchedulesMapper doctorSchedulesMapper;
    private ReserveMapper reserveMapper;
    private ChartsMapper chartsMapper;

    @Autowired
    public void setChartsMapper(ChartsMapper chartsMapper) {
        this.chartsMapper = chartsMapper;
    }

    @Autowired
    public void setReserveMapper(ReserveMapper reserveMapper) {
        this.reserveMapper = reserveMapper;
    }

    @Autowired
    public void setDoctorSchedulesMapper(DoctorSchedulesMapper doctorSchedulesMapper) {
        this.doctorSchedulesMapper = doctorSchedulesMapper;
    }

    @Autowired
    public void setDoctorMapper(DoctorMapper doctorMapper) {
        this.doctorMapper = doctorMapper;
    }

    @Autowired
    public void setPatientMapper(PatientMapper patientMapper) {
        this.patientMapper = patientMapper;
    }

    @Override
    public Integer getPatientTotal() {
        return patientMapper.getPatientTotal();
    }

    @Override
    public Integer getDoctorTotal() {
        return doctorMapper.getDoctorTotal();
    }

    @Override
    public Integer getDoctorSchedulesTotal() {
        return doctorSchedulesMapper.getDoctorSchedulesTotal();
    }

    @Override
    public Integer getReserveTotal() {
        return reserveMapper.getReserveTotal();
    }

    @Override
    public List doctorSchedules(LocalDateTime date) {
        return chartsMapper.doctorSchedules(date);
    }

    @Override
    public List weekDoctor(LocalDateTime date) {
        return chartsMapper.weekDoctor(date);
    }

    @Override
    public List weekReserve(LocalDateTime date) {
        return chartsMapper.weekReserve(date);
    }



    @Override
    public List weekPatient(LocalDateTime date) {
        return chartsMapper.weekPatient(date);
    }

    @Override
    public List hotDoctor(LocalDateTime date) {
        return chartsMapper.getHotDoctor(date);
    }

    @Override
    public List hotDoctorSchedules(LocalDateTime date) {
        return chartsMapper.getHotDoctorSchedules(date);
    }

    @Override
    public List reserveCount(LocalDateTime date) {
        return chartsMapper.getReserveCount(date);
    }
}

